"""
字典练习：升职加薪
    通过for循环，对所有员工级别为1级的员工，级别上升1级，薪水增加1000元
"""
my_dict = {
    "曹操": {"部门": "科技部", "工资": 3000, "级别": 1},
    "刘备": {"部门": "市场部", "工资": 5000, "级别": 2},
    "孙权": {"部门": "市场部", "工资": 7000, "级别": 3},
    "关羽": {"部门": "科技部", "工资": 4000, "级别": 1},
    "张飞": {"部门": "市场部", "工资": 6000, "级别": 2}
}
print(f"全体员工当前信息如下：{my_dict}")
# for循环遍历
for key1 in my_dict:
    if my_dict[key1]["级别"] == 1:
        # 修改级别
        my_dict[key1]["级别"] += 1
        # 薪水增加1000
        my_dict[key1]["工资"] += 1000

print(f"全体员工升职加薪后信息如下：{my_dict}")
